package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.CCustomerinfoDao;
import com.xyz.domain.table.CCustomerinfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CCustomerInfoLogic {

    @Autowired
    CCustomerinfoDao custInfoDao;

    public Integer insertCustInfoByTmep(Integer custId, String category){
        CCustomerinfo customerinfo = new CCustomerinfo();
        customerinfo.setCustomerId(custId);
        customerinfo.setCategory(category);
        return custInfoDao.insertCustInfoByTmep(customerinfo);
    }

    public PageResponseModel<CCustomerinfo> selectPageList(CCustomerinfo customerInfo, Integer pageNo, Integer pageSize){
        return custInfoDao.selectByPageNo(customerInfo, StringUtils.EMPTY, pageNo, pageSize);
    }

}
